
package com.ami.iusb;

import com.ami.kvm.jviewer.Debug;
import com.ami.kvm.jviewer.JViewer;
import com.ami.kvm.jviewer.gui.JVFrame;
import com.ami.kvm.jviewer.gui.JVToolBar;
import com.ami.kvm.jviewer.gui.JViewerApp;
import com.ami.kvm.jviewer.gui.LocaleStrings;
import com.ami.kvm.jviewer.gui.WindowFrame;
import com.ami.vmedia.VMApp;
import com.ami.vmedia.gui.StatusTabPanel;
import com.ami.vmedia.gui.StatusTable;
import com.ami.vmedia.gui.VMPane;
import java.io.File;
import java.io.PrintStream;
import java.net.URL;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JFileChooser;
import javax.swing.JTable;
import javax.swing.filechooser.FileFilter;

public class IUSBRedirSession {
	public static final byte AUTH_USER_PKT_SIZE = 98;
	public static final short WEB_AUTH_PKT_MAX_SIZE = 98;
	public static final short SSI_AUTH_PKT_MAX_SIZE = 210;
	public static final int DEVICE_REDIR_STATUS_IDLE = 0;
	public static final int DEVICE_REDIR_STATUS_CONNECTED = 1;
	public static final byte STOP_NORMAL = 0;
	public static final byte STOP_ON_EJECT = 1;
	public static final byte STOP_ON_TERMINATE = 2;
	public static final byte STOP_ON_DEVICE_REMOVAL = 3;
	public static final byte STOP_ON_SERVER_RESTART = 4;
	public static final byte DEVICE_USED = 0;
	public static final byte DEVICE_FREE = 1;
	public static final int CONNECTION_ACCEPTED = 1;
	public static final int CONNECTION_PERM_DENIED = 5;
	public static final int CONNECTION_MAX_USER = 8;
	public static final int LICENSE_EXPIRED = 13;
	public static final int LINUX_DRIVE_TYPE_USB = 0;
	public static final int LINUX_DRIVE_TYPE_HDD = 1;
	public static final int WINDOWS_DRIVE_TYPE_USB = 2;
	public static final int WINDOWS_DRIVE_TYPE_HDD = 3;
	public static final byte MEDIA_TYPE_HDD = 0;
	public static final byte MEDIA_TYPE_USB = -128;
	public CDROMRedir[] cdromSession;
	public FloppyRedir[] floppySession;
	public HarddiskRedir[] hardDiskSession;
	private boolean cdButtonRedirState = false;
	private boolean fdButtonRedirState = false;
	private boolean hdButtonRedirState = false;

	private JTable statusTable;
	private JTable devStatusTable;
	private final int BYTES_READ_COL = 3;

	public IUSBRedirSession() {
		int i = 0;
		int j = 0;
		int k = 0;

		i = VMApp.getInstance().getNumCD();
		j = VMApp.getInstance().getNumFD();
		k = VMApp.getInstance().getNumHD();
		this.cdromSession = new CDROMRedir[i];
		this.floppySession = new FloppyRedir[j];
		this.hardDiskSession = new HarddiskRedir[k];
	}

	public boolean StartCDROMRedir(String paramString1, int paramInt1, int paramInt2, boolean paramBoolean,
			String paramString2) {
		String str = JViewer.getIp();
		if (str == null) {
			showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"),
					LocaleStrings.getString("6_1_IUSBREDIR") + LocaleStrings.getString("6_6_IUSBREDIR"));

			return false;
		}
		if (paramString2.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_2_IUSBREDIR") + LocaleStrings.getString("6_6_IUSBREDIR"));

			return false;
		}
		try {
			if (this.cdromSession[paramInt2] != null) {
				if (this.cdromSession[paramInt2].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_3_IUSBREDIR"));

					return false;
				}
				this.cdromSession[paramInt2] = null;
				System.gc();
			}

			this.cdromSession[paramInt2] = new CDROMRedir(true);
			if (!this.cdromSession[paramInt2].startRedirection(str, paramString2, paramInt2, paramString1, paramInt1,
					paramBoolean)) {

				if ((this.cdromSession[paramInt2].getErrorMessage() == null)
						&& (this.cdromSession[paramInt2].getErrorMessage().length() == 0)) {
					showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"),
							LocaleStrings.getString("6_4_IUSBREDIR"));
				} else {
					showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"),
							this.cdromSession[paramInt2].getErrorMessage());
				}

				this.cdromSession[paramInt2].setErrorMessage(" ");

				StopCDROMRedir(paramInt2, 0);
				return false;
			}

		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"), LocaleStrings.getString("6_5_IUSBREDIR"));

			StopCDROMRedir(paramInt2, 0);
			return false;

		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"), localRedirectionException.getMessage());
			StopCDROMRedir(paramInt2, 0);
			return false;
		} catch (Exception localException) {
			showErrorMessage(LocaleStrings.getString("6_6_IUSBREDIR"), localException.getMessage());
			StopCDROMRedir(paramInt2, 0);
			return false;
		}
		return true;
	}

	public boolean StopCDROMRedir(int paramInt1, int paramInt2) {
		if (this.cdromSession[paramInt1] != null) {
			if (!this.cdromSession[paramInt1].stopRedirection()) {
				showErrorMessage(LocaleStrings.getString("6_33_IUSBREDIR"), LocaleStrings.getString("6_7_IUSBREDIR"));

				return false;
			}

			if (this.cdromSession[paramInt1].getCdReconnect() == true) {
				return true;
			}

			setCDStopMode(paramInt2, paramInt1);
			this.cdromSession[paramInt1] = null;

			System.gc();
		}
		return true;
	}

	//sessionToken, port, commandType, vmsecure, path
	public boolean StartISORedir(String sessionToken, int port, int commandType, boolean vmsecure,
			String path) {
		String ip = JViewer.getIp();
		if (ip == null) {
			showErrorMessage(LocaleStrings.getString("6_8_IUSBREDIR"),
					LocaleStrings.getString("6_1_IUSBREDIR") + LocaleStrings.getString("6_8_IUSBREDIR"));

			return false;
		}
		if (path.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_8_IUSBREDIR"));

			return false;
		}
		if ((!path.toLowerCase().endsWith(".iso")) && (!path.toLowerCase().endsWith(".nrg"))) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_49_IUSBREDIR"));

			return false;
		}

		try {
			if (this.cdromSession[commandType] != null) {
				if (this.cdromSession[commandType].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_3_IUSBREDIR"));

					return false;
				}
				this.cdromSession[commandType] = null;
				System.gc();
			}

			this.cdromSession[commandType] = new CDROMRedir(false);

			if (!this.cdromSession[commandType].startRedirection(ip, path, commandType, sessionToken, port, vmsecure)) {

				if ((this.cdromSession[commandType].getErrorMessage() == null)
						&& (this.cdromSession[commandType].getErrorMessage().length() == 0)) {
					showErrorMessage(LocaleStrings.getString("6_8_IUSBREDIR"),
							LocaleStrings.getString("6_11_IUSBREDIR"));
				} else {
					showErrorMessage(LocaleStrings.getString("6_8_IUSBREDIR"),
							this.cdromSession[commandType].getErrorMessage());
				}

				this.cdromSession[commandType].setErrorMessage(" ");

				StopISORedir(commandType, 0);
				return false;
			}

		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			showErrorMessage(LocaleStrings.getString("6_8_IUBREDIR"), LocaleStrings.getString("6_12_IUSBREDIR"));

			StopISORedir(commandType, 0);
			return false;
		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_8_IUSBREDIR"), localRedirectionException.getMessage());
			StopISORedir(commandType, 0);
			return false;
		} catch (Exception localException) {
			showErrorMessage(LocaleStrings.getString("6_8_IUSBREDIR"), localException.getMessage());
			StopISORedir(commandType, 0);
			return false;
		}
		return true;
	}

	public boolean StopISORedir(int paramInt1, int paramInt2) {
		return StopCDROMRedir(paramInt1, paramInt2);
	}

	public boolean StartHarddiskRedir(String paramString1, int paramInt1, int paramInt2, boolean paramBoolean,
			String paramString2, byte paramByte) {
		String str = JViewer.getIp();
		if (str == null) {
			showErrorMessage(LocaleStrings.getString("6_13_IUSBREDIR"), LocaleStrings.getString("6_1_IUSBREDIR"));

			return false;
		}
		if (paramString2.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_14_IUSBREDIR") + LocaleStrings.getString("6_13_IUSBREDIR"));

			return false;
		}
		try {
			if (this.hardDiskSession[paramInt2] != null) {
				if (this.hardDiskSession[paramInt2].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_15_IUSBREDIR"));

					return false;
				}
				this.hardDiskSession[paramInt2] = null;
				System.gc();
			}
			this.hardDiskSession[paramInt2] = new HarddiskRedir(true);
			this.hardDiskSession[paramInt2].setDrive_Type(paramByte);

			if (!this.hardDiskSession[paramInt2].startRedirection(str, paramString2, paramInt2, paramString1, paramInt1,
					paramBoolean)) {
				if ((this.hardDiskSession[paramInt2].getErrorMessage() == null)
						&& (this.hardDiskSession[paramInt2].getErrorMessage().length() == 0)) {
					showErrorMessage(LocaleStrings.getString("6_13_IUSBREDIR"),
							LocaleStrings.getString("6_16_IUSBREDIR"));
				} else {
					showErrorMessage(LocaleStrings.getString("6_13_IUSBREDIR"),
							this.hardDiskSession[paramInt2].getErrorMessage());
				}

				this.hardDiskSession[paramInt2].setErrorMessage(" ");

				StopHarddiskRedir(paramInt2, 0);
				return false;
			}
		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			Debug.out.println(localUnsatisfiedLinkError);

			showErrorMessage(LocaleStrings.getString("6_13_IUSBREDIR"), LocaleStrings.getString("6_17_IUSBREDIR"));

			StopHarddiskRedir(paramInt2, 0);
			return false;

		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_13_IUSBREDIR"), localRedirectionException.getMessage());
			StopHarddiskRedir(paramInt2, 0);
			return false;
		}
		return true;
	}

	public boolean StartFloppyRedir(String paramString1, int paramInt1, int paramInt2, boolean paramBoolean,
			String paramString2) {
		String str = JViewer.getIp();
		if (str == null) {
			showErrorMessage(LocaleStrings.getString("6_18_IUSBREDIR"),
					LocaleStrings.getString("6_1_IUSBREDIR") + LocaleStrings.getString("6_18_IUSBREDIR"));

			return false;
		}
		if (paramString2.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_2_IUSBREDIR") + LocaleStrings.getString("6_18_IUSBREDIR"));

			return false;
		}
		try {
			if (this.floppySession[paramInt2] != null) {
				if (this.floppySession[paramInt2].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_19_IUSBREDIR"));

					return false;
				}
				this.floppySession[paramInt2] = null;
				System.gc();
			}
			this.floppySession[paramInt2] = new FloppyRedir(true);

			if (!this.floppySession[paramInt2].startRedirection(str, paramString2, paramInt2, paramString1, paramInt1,
					paramBoolean)) {
				if ((this.floppySession[paramInt2].getErrorMessage() == null)
						&& (this.floppySession[paramInt2].getErrorMessage().length() == 0)) {
					showErrorMessage(LocaleStrings.getString("6_18_IUSBREDIR"),
							LocaleStrings.getString("6_20_IUSBREDIR"));
				} else {
					showErrorMessage(LocaleStrings.getString("6_18_IUSBREDIR"),
							this.floppySession[paramInt2].getErrorMessage());
				}

				this.floppySession[paramInt2].setErrorMessage(" ");

				StopFloppyRedir(paramInt2, 0);
				return false;
			}

		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			showErrorMessage(LocaleStrings.getString("6_18_IUSBREDIR"), LocaleStrings.getString("6_21_IUSBREDIR"));

			StopFloppyRedir(paramInt2, 0);
			return false;

		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_18_IUSBREDIR"), localRedirectionException.getMessage());
			StopFloppyRedir(paramInt2, 0);
			return false;
		}
		return true;
	}

	public boolean StopHarddiskRedir(int paramInt1, int paramInt2) {
		if (this.hardDiskSession[paramInt1] != null) {
			if (!this.hardDiskSession[paramInt1].stopRedirection()) {
				showErrorMessage(LocaleStrings.getString("6_34_IUSBREDIR"), LocaleStrings.getString("6_36_IUSBREDIR"));

				return false;
			}

			if (this.hardDiskSession[paramInt1].getHdReconnect() == true) {
				return true;
			}

			setHDStopMode(paramInt2, paramInt1);
			this.hardDiskSession[paramInt1] = null;

			System.gc();
		}
		return true;
	}

	public boolean StopFloppyRedir(int paramInt1, int paramInt2) {
		if (this.floppySession[paramInt1] != null) {
			if (!this.floppySession[paramInt1].stopRedirection()) {
				showErrorMessage(LocaleStrings.getString("6_35_IUSBREDIR"), LocaleStrings.getString("6_22_IUSBREDIR"));

				return false;
			}

			if (this.floppySession[paramInt1].getFdReconnect() == true) {
				return true;
			}

			setFDStopMode(paramInt2, paramInt1);
			this.floppySession[paramInt1] = null;

			System.gc();
		}
		return true;
	}

	public boolean StartFloppyImageRedir(String paramString1, int paramInt1, int paramInt2, boolean paramBoolean,
			String paramString2) {
		String str = JViewer.getIp();
		if (str == null) {
			showErrorMessage(LocaleStrings.getString("6_23_IUSBREDIR"),
					LocaleStrings.getString("6_1_IUSBREDIR") + LocaleStrings.getString("6_23_IUSBREDIR"));

			return false;
		}

		if (paramString2.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_23_IUSBREDIR"));

			return false;
		}
		if ((!paramString2.toLowerCase().endsWith(".img")) && (!paramString2.toLowerCase().endsWith(".ima"))) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_50_IUSBREDIR"));

			return false;
		}

		try {
			if (this.floppySession[paramInt2] != null) {
				if (this.floppySession[paramInt2].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_24_IUSBREDIR"));

					return false;
				}
				this.floppySession[paramInt2] = null;
				System.gc();
			}

			this.floppySession[paramInt2] = new FloppyRedir(false);

			if (!this.floppySession[paramInt2].startRedirection(str, paramString2, paramInt2, paramString1, paramInt1,
					paramBoolean)) {

				if ((this.floppySession[paramInt2].getErrorMessage() == null)
						&& (this.floppySession[paramInt2].getErrorMessage().length() == 0)) {
					showErrorMessage(LocaleStrings.getString("6_23_IUSBREDIR"),
							LocaleStrings.getString("6_25_IUSBREDIR"));
				} else {
					showErrorMessage(LocaleStrings.getString("6_23_IUSBREDIR"),
							this.floppySession[paramInt2].getErrorMessage());
				}

				this.floppySession[paramInt2].setErrorMessage(" ");

				StopFloppyImageRedir(paramInt2, 0);
				return false;
			}

		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			showErrorMessage(LocaleStrings.getString("6_23_IUSBREDIR"), LocaleStrings.getString("6_26_IUSBREDIR"));

			StopFloppyImageRedir(paramInt2, 0);
			return false;
		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_23_IUSBREDIR"), localRedirectionException.getMessage());

			StopFloppyImageRedir(paramInt2, 0);
			return false;
		}
		return true;
	}

	public boolean StartharddiskImageRedir(String paramString1, int paramInt1, int paramInt2, boolean paramBoolean,
			String paramString2, byte paramByte) {
		String str = JViewer.getIp();
		if (str == null) {
			showErrorMessage(LocaleStrings.getString("6_27_IUSBREDIR"), LocaleStrings.getString("6_1_IUSBREDIR"));

			return false;
		}

		if (paramString2.length() == 0) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_27_IUSBREDIR"));

			return false;
		}
		if (paramString2.indexOf(" : ") != -1) {
			String[] arrayOfString = paramString2.split(" : ");
			if (arrayOfString.length != 3) {
				showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
						LocaleStrings.getString("6_52_IUSBREDIR") + LocaleStrings.getString("6_51_IUSBREDIR"));

				return false;
			}

			if ((arrayOfString[0].length() == 0) || (arrayOfString[1].length() == 0)
					|| (arrayOfString[2].length() == 0)) {
				showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
						LocaleStrings.getString("6_52_IUSBREDIR") + LocaleStrings.getString("6_51_IUSBREDIR"));

				return false;
			}

			if (!imageSizeCheck(arrayOfString[0])) {
				showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
						LocaleStrings.getString("6_53_IUSBREDIR") + LocaleStrings.getString("6_51_IUSBREDIR"));

				return false;
			}

		} else if ((!paramString2.toLowerCase().endsWith(".img")) && (!paramString2.toLowerCase().endsWith(".ima"))) {
			showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
					LocaleStrings.getString("6_9_IUSBREDIR") + LocaleStrings.getString("6_51_IUSBREDIR"));

			return false;
		}
		try {
			if (this.hardDiskSession[paramInt2] != null) {
				if (this.hardDiskSession[paramInt2].isRedirActive()) {
					showErrorMessage(LocaleStrings.getString("6_32_IUSBREDIR"),
							LocaleStrings.getString("6_28_IUSBREDIR"));

					return false;
				}
				this.hardDiskSession[paramInt2] = null;
				System.gc();
			}

			this.hardDiskSession[paramInt2] = new HarddiskRedir(false);
			this.hardDiskSession[paramInt2].setDrive_Type(paramByte);

			if (!this.hardDiskSession[paramInt2].startRedirection(str, paramString2, paramInt2, paramString1, paramInt1,
					paramBoolean)) {

				if (this.hardDiskSession[paramInt2] != null) {

					if ((this.hardDiskSession[paramInt2].getErrorMessage() == null)
							&& (this.hardDiskSession[paramInt2].getErrorMessage().length() == 0)) {
						showErrorMessage(LocaleStrings.getString("6_27_IUSBREDIR"),
								LocaleStrings.getString("6_29_IUSBREDIR"));
					} else {
						showErrorMessage(LocaleStrings.getString("6_27_IUSBREDIR"),
								this.hardDiskSession[paramInt2].getErrorMessage());
					}

					this.hardDiskSession[paramInt2].setErrorMessage(" ");

					StopHarddiskImageRedir(paramInt2, 0);
					return false;
				}

				return false;
			}

		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			showErrorMessage(LocaleStrings.getString("6_27_IUSBREDIR"), LocaleStrings.getString("6_30_IUSBREDIR"));

			StopHarddiskImageRedir(paramInt2, 0);
			return false;
		} catch (RedirectionException localRedirectionException) {
			showErrorMessage(LocaleStrings.getString("6_27_IUSBREDIR"), localRedirectionException.getMessage());

			StopHarddiskImageRedir(paramInt2, 0);
			return false;
		}
		return true;
	}

	private static boolean imageSizeCheck(String paramString) {
		Pattern localPattern = Pattern.compile("[0-9]*");
		Matcher localMatcher = localPattern.matcher(paramString);

		if (!localMatcher.matches()) {
			System.out.println("imageSizeCheck(), match failed");
			return false;
		}

		int i = Integer.valueOf(paramString).intValue();

		if (i <= 0) {
			System.out.println("imageSizeCheck(), less then 0");
			return false;
		}

		return (i & i - 1) == 0;
	}

	// XXX by tianlin for [CD执行] 参数：0，sessionToken, cdport, 0, false(vmsecure==1), CD Image path, false
	public boolean startDeviceRedirection(int tabType, String sessionToken, int port, int commandType,
			boolean vmsecure, String path, boolean paramBoolean2) {
		boolean bool = false;
		switch (tabType) {
		case 0:
			if (paramBoolean2) {
				bool = StartCDROMRedir(sessionToken, port, commandType, vmsecure, path);
			} else
				bool = StartISORedir(sessionToken, port, commandType, vmsecure, path);
			break;
		case 1:
			if (paramBoolean2) {
				bool = StartFloppyRedir(sessionToken, port, commandType, vmsecure, path);
			} else
				bool = StartFloppyImageRedir(sessionToken, port, commandType, vmsecure, path);
			break;
		case 2:
			byte b;
			if (paramBoolean2) {
				b = getMediaType(path);
				bool = StartHarddiskRedir(sessionToken, port, commandType, vmsecure, path, b);
			} else {
				b = Byte.MIN_VALUE;
				bool = StartharddiskImageRedir(sessionToken, port, commandType, vmsecure, path, b);
			}
			break;
		}
		return bool;
	}

	public boolean stopDeviceRedirection(int paramInt1, int paramInt2) {
		boolean bool = false;
		int i = 0;
		switch (paramInt1) {
		case 0:
			synchronized (CDROMRedir.getSyncObj()) {
				CDROMRedir.getSyncObj().notify();
			}
			StopCDROMRedir(paramInt2, i);
			break;
		case 1:
			synchronized (FloppyRedir.getSyncObj()) {
				FloppyRedir.getSyncObj().notify();
			}
			StopFloppyRedir(paramInt2, i);
			break;
		case 2:
			synchronized (HarddiskRedir.getSyncObj()) {
				HarddiskRedir.getSyncObj().notify();
			}
			StopHarddiskRedir(paramInt2, i);
		}

		return bool;
	}

	public boolean StopFloppyImageRedir(int paramInt1, int paramInt2) {
		return StopFloppyRedir(paramInt1, paramInt2);
	}

	public boolean StopHarddiskImageRedir(int paramInt1, int paramInt2) {
		return StopHarddiskRedir(paramInt1, paramInt2);
	}

	public String getLIBCDROMVersion(int paramInt) {
		String str;

		try {
			if (this.cdromSession[paramInt] == null) {
				this.cdromSession[paramInt] = new CDROMRedir(false);
				str = this.cdromSession[paramInt].getLIBCDROMVersion();
				this.cdromSession[paramInt] = null;

				System.gc();
			} else {
				str = this.cdromSession[paramInt].getLIBCDROMVersion();
			}
		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			str = LocaleStrings.getString("6_31_IUSBREDIR");
		}

		return str;
	}

	class ISOImageFilter extends FileFilter {
		ISOImageFilter() {
		}

		public boolean accept(File paramFile) {
			String str = paramFile.getName();
			return (str.toLowerCase().endsWith(".iso")) || (paramFile.isDirectory());
		}

		public String getDescription() {
			return "*.iso; *.ISO";
		}
	}

	class NRGImageFilter extends FileFilter {
		NRGImageFilter() {
		}

		public boolean accept(File paramFile) {
			String str = paramFile.getName();
			return (str.toLowerCase().endsWith(".nrg")) || (paramFile.isDirectory());
		}

		public String getDescription() {
			return "*.nrg; *.NRG";
		}
	}

	class CDImageFilter extends FileFilter {
		CDImageFilter() {
		}

		public boolean accept(File paramFile) {
			boolean bool = false;
			if ((new ISOImageFilter().accept(paramFile))
					|| (new NRGImageFilter().accept(paramFile)))
				bool = true;
			return bool;
		}

		public String getDescription() {
			return "ISO(*.iso, *.ISO), NRG(*.nrg, *.NRG)";
		}
	}

	public String cdImageSelector(String paramString) {
		JVFrame localJVFrame = JViewerApp.getInstance().getMainWindow();
		JFileChooser localJFileChooser = new JFileChooser(paramString);
		localJFileChooser.setFileFilter(new CDImageFilter());

		if (localJFileChooser.showOpenDialog(localJVFrame) == 0) {
			return localJFileChooser.getSelectedFile().getAbsolutePath();
		}
		return null;
	}

	public String getLIBFLOPPYVersion(int paramInt) {
		String str;

		try {
			if (this.floppySession[paramInt] == null) {
				this.floppySession[paramInt] = new FloppyRedir(false);
				str = this.floppySession[paramInt].getLIBFLOPPYVersion();
				this.floppySession = null;

				System.gc();
			} else {
				str = this.floppySession[paramInt].getLIBFLOPPYVersion();
			}
		} catch (UnsatisfiedLinkError localUnsatisfiedLinkError) {
			str = LocaleStrings.getString("6_31_IUSBREDIR");
		}

		return str;
	}

	public boolean isCDROMPhysicalDrive(int paramInt) {
		if (this.cdromSession[paramInt] != null) {
			if (this.cdromSession[paramInt].isPhysicalDevice() == true)
				return true;
		}
		return false;
	}

	public boolean isHarddiskPhysicalDrive(int paramInt) {
		if (this.hardDiskSession[paramInt] != null) {
			if (this.hardDiskSession[paramInt].isPhysicalDevice() == true)
				return true;
		}
		return false;
	}

	public boolean isFloppyPhysicalDrive(int paramInt) {
		if (this.floppySession[paramInt] != null) {
			if (this.floppySession[paramInt].isPhysicalDevice() == true)
				return true;
		}
		return false;
	}

	class FloppyImageFilter extends FileFilter {
		FloppyImageFilter() {
		}

		public boolean accept(File paramFile) {
			String str = paramFile.getName();
			return (str.toLowerCase().endsWith(".img")) || (str.toLowerCase().endsWith(".ima"))
					|| (paramFile.isDirectory());
		}

		public String getDescription() {
			return "IMG(*.img, *.IMG), IMA(*.ima, *.IMA)";
		}
	}

	public String floppyImageSelector(String paramString) {
		JVFrame localJVFrame = JViewerApp.getInstance().getMainWindow();
		JFileChooser localJFileChooser = new JFileChooser(paramString);
		localJFileChooser.setFileFilter(new FloppyImageFilter());
		if (localJFileChooser.showOpenDialog(localJVFrame) == 0) {
			return localJFileChooser.getSelectedFile().getAbsolutePath();
		}
		return null;
	}

	public void stopCDROMAbnormal(int paramInt) {
		try {
			System.gc();
			this.cdromSession[paramInt].setCdromRedirStatus(0);
			this.cdromSession[paramInt] = null;
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			System.gc();
			Debug.out.println(localArrayIndexOutOfBoundsException);
		}
	}

	public void stopFloppyAbnormal(int paramInt) {
		try {
			System.gc();
			this.floppySession[paramInt].setFloppyRedirStatus(0);
			this.floppySession[paramInt] = null;
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			System.gc();
			Debug.out.println(localArrayIndexOutOfBoundsException);
		}
	}

	public void stopHarddiskAbnormal(int paramInt) {
		try {
			System.gc();
			this.hardDiskSession[paramInt].setHarddiskRedirStatus(0);
			this.hardDiskSession[paramInt] = null;
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			System.gc();
			Debug.out.println(localArrayIndexOutOfBoundsException);
		}
	}

	public int getCDROMRedirStatus(int paramInt) {
		int i = 0;
		try {
			if (this.cdromSession[paramInt] != null)
				i = this.cdromSession[paramInt].getCdromRedirStatus();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public int getHarddiskRedirStatus(int paramInt) {
		int i = 0;
		try {
			if (this.hardDiskSession[paramInt] != null)
				i = this.hardDiskSession[paramInt].getHarddiskRedirStatus();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public int getFloppyRedirStatus(int paramInt) {
		int i = 0;
		try {
			if (this.floppySession[paramInt] != null)
				i = this.floppySession[paramInt].getFloppyRedirStatus();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public int getDeviceRedirStatus(int paramInt1, int paramInt2) {
		int i = 0;
		try {
			switch (paramInt1) {
			case 0:
				i = getCDROMRedirStatus(paramInt2);
				break;
			case 1:
				i = getFloppyRedirStatus(paramInt2);
				break;
			case 2:
				i = getHarddiskRedirStatus(paramInt2);
			}
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public String getCDROMSource(int paramInt) {
		if (this.cdromSession[paramInt] != null) {
			return this.cdromSession[paramInt].getSourceDrive();
		}
		return new String("");
	}

	public String getFloppySource(int paramInt) {
		if (this.floppySession[paramInt] != null) {
			return this.floppySession[paramInt].getSourceDrive();
		}
		return new String("");
	}

	public String getHarddiskSource(int paramInt) {
		if (this.hardDiskSession[paramInt] != null) {
			return this.hardDiskSession[paramInt].getSourceDrive();
		}
		return new String("");
	}

	public String getDeviceRedirSource(int paramInt1, int paramInt2) {
		String str = null;
		switch (paramInt1) {
		case 0:
			str = getCDROMSource(paramInt2);
			break;
		case 1:
			str = getFloppySource(paramInt2);
			break;
		case 2:
			str = getHarddiskSource(paramInt2);
		}

		return str;
	}

	public int getCDROMReadBytes(int paramInt) {
		if (this.cdromSession[paramInt] != null) {
			return this.cdromSession[paramInt].getBytesRedirected();
		}
		return 0;
	}

	public int getFloppyReadBytes(int paramInt) {
		if (this.floppySession[paramInt] != null) {
			return this.floppySession[paramInt].getBytesRedirected();
		}
		return 0;
	}

	public int getHarddiskReadBytes(int paramInt) {
		if (this.hardDiskSession[paramInt] != null) {
			return this.hardDiskSession[paramInt].getBytesRedirected();
		}
		return 0;
	}

	public boolean isImageRedirected(int paramInt1, int paramInt2) {
		boolean bool = false;
		switch (paramInt1) {
		case 0:
			bool = getCdromSession(paramInt2).isCdImageRedirected();
			break;
		case 1:
			bool = getFloppySession(paramInt2).isFdImageRedirected();
			break;
		case 2:
			bool = getHarddiskSession(paramInt2).isHdImageRedirected();
		}

		return bool;
	}

	public void setImageRedirected(int paramInt1, int paramInt2, boolean paramBoolean) {
		switch (paramInt1) {
		case 0:
			getCdromSession(paramInt2).setCdImageRedirected(paramBoolean);
			break;
		case 1:
			getFloppySession(paramInt2).setFdImageRedirected(paramBoolean);
			break;
		case 2:
			getHarddiskSession(paramInt2).setHdImageRedirected(paramBoolean);
		}

	}

	public CDROMRedir getCdromSession(int paramInt) {
		CDROMRedir localCDROMRedir = null;
		if (paramInt < this.cdromSession.length)
			localCDROMRedir = this.cdromSession[paramInt];
		return localCDROMRedir;
	}

	public void setCdromSession(CDROMRedir paramCDROMRedir, int paramInt) {
		this.cdromSession[paramInt] = paramCDROMRedir;
	}

	public FloppyRedir getFloppySession(int paramInt) {
		FloppyRedir localFloppyRedir = null;
		if (paramInt < this.floppySession.length)
			localFloppyRedir = this.floppySession[paramInt];
		return localFloppyRedir;
	}

	public void setFloppySession(FloppyRedir paramFloppyRedir, int paramInt) {
		this.floppySession[paramInt] = paramFloppyRedir;
	}

	public HarddiskRedir getHarddiskSession(int paramInt) {
		HarddiskRedir localHarddiskRedir = null;
		if (paramInt < this.hardDiskSession.length)
			localHarddiskRedir = this.hardDiskSession[paramInt];
		return localHarddiskRedir;
	}

	public void setHarddiskSession(HarddiskRedir paramHarddiskRedir, int paramInt) {
		this.hardDiskSession[paramInt] = paramHarddiskRedir;
	}

	public int getCDInstanceNumber(int paramInt) {
		return this.cdromSession[paramInt].getCdInstanceNum();
	}

	public int getFDInstanceNumber(int paramInt) {
		return this.floppySession[paramInt].getFdInstanceNum();
	}

	public int getHDInstanceNumber(int paramInt) {
		return this.hardDiskSession[paramInt].getHdInstanceNum();
	}

	public int getDeviceInstanceNumber(int paramInt1, int paramInt2) {
		int i = 0;
		switch (paramInt1) {
		case 0:
			i = getCDInstanceNumber(paramInt2);
			break;
		case 1:
			i = getFDInstanceNumber(paramInt2);
			break;
		case 2:
			i = getHDInstanceNumber(paramInt2);
		}

		return i;
	}

	public void updateCDToolbarButtonStatus(boolean paramBoolean) {
		if (paramBoolean != this.cdButtonRedirState) {
			URL localURL;
			if (paramBoolean) {
				localURL = JViewer.class.getResource("res/CDR.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getCDBtn().setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getCDBtn()
						.setToolTipText(LocaleStrings.getString("G_21_VMD"));
				this.cdButtonRedirState = true;
			} else {
				localURL = JViewer.class.getResource("res/CD.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getCDBtn().setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getCDBtn()
						.setToolTipText(LocaleStrings.getString("G_20_VMD"));
				this.cdButtonRedirState = false;
			}
		}
	}

	public void updateFDToolbarButtonStatus(boolean paramBoolean) {
		if (paramBoolean != this.fdButtonRedirState) {
			URL localURL;
			if (paramBoolean) {
				localURL = JViewer.class.getResource("res/FloppyR.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getFloppyBtn().setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getFloppyBtn()
						.setToolTipText(LocaleStrings.getString("G_23_VMD"));
				this.fdButtonRedirState = true;
			} else {
				localURL = JViewer.class.getResource("res/Floppy.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getFloppyBtn().setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getFloppyBtn()
						.setToolTipText(LocaleStrings.getString("G_22_VMD"));
				this.fdButtonRedirState = false;
			}
		}
	}

	public void updateHDToolbarButtonStatus(boolean paramBoolean) {
		if (paramBoolean != this.hdButtonRedirState) {
			URL localURL;
			if (paramBoolean) {
				localURL = JViewer.class.getResource("res/HDR.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getHardddiskBtn()
						.setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getHardddiskBtn()
						.setToolTipText(LocaleStrings.getString("G_25_VMD"));
				this.hdButtonRedirState = true;
			} else {
				localURL = JViewer.class.getResource("res/HD.png");
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getHardddiskBtn()
						.setIcon(new ImageIcon(localURL));
				JViewerApp.getInstance().getM_wndFrame().getToolbar().getHardddiskBtn()
						.setToolTipText(LocaleStrings.getString("G_24_VMD"));
				this.hdButtonRedirState = false;
			}
		}
	}

	public int getCDROMDeviceStatus(int paramInt) {
		int i = 1;
		try {
			if (this.cdromSession[paramInt] != null)
				i = this.cdromSession[paramInt].getCdROMDeviceStatus();
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 1;
		}
		return i;
	}

	public void setCDROMDeviceStatus(int paramInt1, int paramInt2) {
		try {
			this.cdromSession[paramInt1].setCdROMDeviceStatus(paramInt2);
		} catch (Exception localException) {
			Debug.out.println(localException);
		}
	}

	public int getFloppyDeviceStatus(int paramInt) {
		int i = 1;
		try {
			if (this.floppySession[paramInt] != null)
				i = this.floppySession[paramInt].getFloppyDeviceStatus();
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 1;
		}
		return i;
	}

	public void setFloppyDeviceStatus(int paramInt1, int paramInt2) {
		try {
			this.floppySession[paramInt1].setFloppyDeviceStatus(paramInt2);
		} catch (Exception localException) {
		}
	}

	public int getHardDiskDeviceStatus(int paramInt) {
		int i = 1;
		try {
			if (this.hardDiskSession[paramInt] != null)
				i = this.hardDiskSession[paramInt].getHardDiskDeviceStatus();
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 1;
		}
		return i;
	}

	public void setHardDiskDeviceStatus(int paramInt1, int paramInt2) {
		try {
			this.hardDiskSession[paramInt1].setHardDiskDeviceStatus(paramInt2);
		} catch (Exception localException) {
		}
	}

	public int getDeviceStatus(int paramInt1, int paramInt2) {
		int i = 1;
		switch (paramInt1) {
		case 0:
			i = getCDROMDeviceStatus(paramInt2);
			break;
		case 1:
			i = getFloppyDeviceStatus(paramInt2);
			break;
		case 2:
			i = getHardDiskDeviceStatus(paramInt2);
		}

		return i;
	}

	public void setDeviceStatus(int paramInt1, int paramInt2, int paramInt3) {
		switch (paramInt1) {
		case 0:
			setCDROMDeviceStatus(paramInt2, paramInt3);
			break;
		case 1:
			setFloppyDeviceStatus(paramInt2, paramInt3);
			break;
		case 2:
			setHardDiskDeviceStatus(paramInt2, paramInt3);
		}

	}

	public void setDeviceStopMode(int paramInt1, int paramInt2, boolean paramBoolean) {
		switch (paramInt1) {
		case 0:
			getCdromSession(paramInt2).setCdStoppedByUser(paramBoolean);
			break;
		case 1:
			getFloppySession(paramInt2).setFdStoppedByUser(paramBoolean);
			break;
		case 2:
			getHarddiskSession(paramInt2).setHdStoppedByUser(paramBoolean);
		}
	}

	public byte getMediaType(String paramString) {
     byte b = 0;
     if (paramString != null) {
       String[] arrayOfString1 = getEntireHarddiskList();
       Object localObject1; int i; Object localObject3; String str2; if (System.getProperty("os.name").startsWith("Win"))
       {
 
 
 
         localObject1 = paramString.substring(paramString.indexOf('-') + 1, paramString.indexOf('[') - 1);
         i = Integer.parseInt((String)localObject1);
         for (String x : arrayOfString1)
         {
           Debug.out.println("DRIVE : " + (String)x);
           
           str2 = ((String)x).substring(0, 1);
           int n = Integer.parseInt(str2);
           if (n == i)
           {
             String str4 = ((String)x).substring(1, 2);
             int i2 = Integer.parseInt(str4);
             if (i2 == 3) {
               b = 0;
             } else if (i2 == 2) {
               b = Byte.MIN_VALUE;
             }
           }
         }
       } else if (System.getProperty("os.name").equals("Linux")) {
         for (Object localObject2 : arrayOfString1) {
           String str1 = ((String)localObject2).substring(0, ((String)localObject2).length() - 1);
           localObject3 = paramString.split("-");
           str2 = ((String[])localObject3)[0].trim();
           
           Debug.out.println("string::" + paramString + "Drive_name::" + str1);
           Debug.out.println("COMPARED::" + str1.compareTo(str2));
           if (str1.compareTo(str2) == 0) {
             String str3 = ((String)localObject2).substring(((String)localObject2).length() - 1, ((String)localObject2).length());
             int i1 = Integer.parseInt(str3);
             if (i1 == 1) {
               b = 0;
             } else if (i1 == 0) {
               b = Byte.MIN_VALUE;
             }
           }
         }
       }
     }
     return b;
   }

	public String[] getEntireHarddiskList() {
		String[] arrayOfString = null;
		HarddiskRedir localHarddiskRedir = new HarddiskRedir(true);
		arrayOfString = localHarddiskRedir.getEntireHarddiskList();
		System.gc();
		return arrayOfString;
	}

	private void showErrorMessage(String paramString1, String paramString2) {
		if (!JViewer.isVMApp()) {
			JViewerApp.getInstance().getMainWindow().generalErrorMessage(paramString1, paramString2);
		} else {
			VMApp.getInstance().generalErrorMessage(paramString1, paramString2);
		}
	}

	public int getCDStopMode(int paramInt) {
		int i;
		try {
			if (this.cdromSession[paramInt] == null)
				return 0;
			i = this.cdromSession[paramInt].getCdStopMode();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			localArrayIndexOutOfBoundsException.printStackTrace();
			i = 0;
		} catch (Exception localException) {
			localException.printStackTrace();
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public void setCDStopMode(int paramInt1, int paramInt2) {
		try {
			this.cdromSession[paramInt2].setCdStopMode(paramInt1);
			showStopStatus(0, paramInt2, paramInt1);
		} catch (Exception localException) {
			Debug.out.println(localException);
			localException.printStackTrace();
			this.cdromSession[paramInt2].setCdStopMode(0);
		}
	}

	public int getFDStopMode(int paramInt) {
		int i;
		try {
			if (this.floppySession[paramInt] == null)
				return 0;
			i = this.floppySession[paramInt].getFdStopMode();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public void setFDStopMode(int paramInt1, int paramInt2) {
		try {
			this.floppySession[paramInt2].setFdStopMode(paramInt1);
			showStopStatus(1, paramInt2, paramInt1);
		} catch (Exception localException) {
			Debug.out.println(localException);
			this.floppySession[paramInt2].setFdStopMode(0);
		}
	}

	public int getHDStopMode(int paramInt) {
		int i;
		try {
			if (this.hardDiskSession[paramInt] == null)
				return 0;
			i = this.hardDiskSession[paramInt].getHdStopMode();
		} catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException) {
			Debug.out.println(localArrayIndexOutOfBoundsException);
			i = 0;
		} catch (Exception localException) {
			Debug.out.println(localException);
			i = 0;
		}
		return i;
	}

	public void setHDStopMode(int paramInt1, int paramInt2) {
		try {
			this.hardDiskSession[paramInt2].setHdStopMode(paramInt1);
			showStopStatus(2, paramInt2, paramInt1);
		} catch (Exception localException) {
			Debug.out.println(localException);
			this.hardDiskSession[paramInt2].setHdStopMode(0);
		}
	}

	private void showStopStatus(int paramInt1, int paramInt2, int paramInt3) {
		if (paramInt1 == 0) {
			this.statusTable = VMApp.getVMPane().getStatusTabPanel().getCDStatusTable().getStatusTable();
			this.devStatusTable = VMApp.getVMPane().getCDStatusTable();
		} else if (paramInt1 == 1) {
			this.statusTable = VMApp.getVMPane().getStatusTabPanel().getFDStatusTable().getStatusTable();
			this.devStatusTable = VMApp.getVMPane().getFDStatusTable();
		} else if (paramInt1 == 2) {
			this.statusTable = VMApp.getVMPane().getStatusTabPanel().getHDStatusTable().getStatusTable();
			this.devStatusTable = VMApp.getVMPane().getHDStatusTable();
		} else {
			return;
		}
		if (paramInt3 == 0) {
			this.statusTable.setValueAt(LocaleStrings.getString("AL_8_ST"), paramInt2, 3);
			this.devStatusTable.setValueAt(LocaleStrings.getString("AL_8_ST"), paramInt2, 3);
		} else if (paramInt3 == 1) {
			this.statusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_10_ST") + "</b></font></html>", paramInt2, 3);

			this.devStatusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_10_ST") + "</b></font></html>", paramInt2, 3);

		} else if (paramInt3 == 2) {
			this.statusTable.setValueAt("<html><font color=\"Red\"><font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_11_ST") + "</b></font></html>", paramInt2, 3);

			this.devStatusTable.setValueAt("<html><font color=\"Red\"><font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_11_ST") + "</b></font></html>", paramInt2, 3);

		} else if (paramInt3 == 3) {
			this.statusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_12_ST") + "</b></font></html>", paramInt2, 3);

			this.devStatusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_12_ST") + "</b></font></html>", paramInt2, 3);

		} else if (paramInt3 == 4) {
			this.statusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_13_ST") + "</b></font></html>", paramInt2, 3);

			this.devStatusTable.setValueAt("<html><font color=\"Red\" font size =\"3\"><b>"
					+ LocaleStrings.getString("AL_13_ST") + "</b></font></html>", paramInt2, 3);
		}
	}
}

/*
 * Location:
 * D:\Users\tianlin\Downloads\JViewer.jar!\com\ami\iusb\IUSBRedirSession.class
 * Java compiler version: 5 (49.0) JD-Core Version: 0.7.1
 */